
package com.complex.simple.struts.web.web;


import com.complex.simple.struts.web.api.ILoginService;
import com.opensymphony.xwork2.ActionSupport;


/**
 * TODO Comment of LoginAction
 * @author wb_liang.gao
 *
 */
public class LoginAction extends ActionSupport{  
    
    private static final long serialVersionUID = 6071782415589335569L;

    private ILoginService loginService;
    
    private String name;
    private String password;
  
    private int i;
    
    public String doLogin(){
        System.out.println("=======================>i:"+(i++)+"====>hashcode:"+this.hashCode());
    	if(loginService.doLogin(name, password)){
    		return SUCCESS;
    	}
    	return ERROR;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public ILoginService getLoginService() {
        return loginService;
    }

    public void setLoginService(ILoginService loginService) {
        this.loginService = loginService;
    }
    
   
}
